/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 50px;
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ffd700;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    width: 300px;
    font-size: 1rem;
}

.search-box button {
    background: none;
    border: none;
    color: white;
    margin-left: -40px;
    cursor: pointer;
}

/* 模块通用样式 */
.module {
    padding: 2rem;
    margin: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.module h2 {
    color: #4a4a4a;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* 卡片样式 */
.card, .advice-card, .service-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.card:hover, .advice-card:hover, .service-card:hover {
    transform: translateY(-5px);
}

.data-cards, .advice-container, .telemedicine-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* 图标样式 */
.fas {
    font-size: 2rem;
    color: #6e8efb;
    margin-bottom: 1rem;
}

/* 统一按钮基础样式 */
.action-btn, 
.submit-btn, 
.cancel-btn, 
.edit-btn, 
.close-btn,
.register-btn,
.card button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 按钮悬停效果 */
.action-btn:hover, 
.submit-btn:hover, 
.cancel-btn:hover, 
.edit-btn:hover, 
.close-btn:hover,
.register-btn:hover,
.card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 按钮激活效果 */
.action-btn:active, 
.submit-btn:active, 
.cancel-btn:active, 
.edit-btn:active, 
.close-btn:active,
.register-btn:active,
.card button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 主要操作按钮（添加、保存等） */
.add-btn,
.submit-btn,
.card button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.add-btn:hover,
.submit-btn:hover,
.card button:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

/* 编辑按钮 */
.edit-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

/* 删除和取消按钮 */
.delete-btn,
.cancel-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.delete-btn:hover,
.cancel-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
}

/* 关闭按钮 */
.close-btn {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: white;
}

.close-btn:hover {
    background: linear-gradient(135deg, #757575, #616161);
}

/* 禁用状态 */
.action-btn:disabled,
.submit-btn:disabled,
.edit-btn:disabled,
.card button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 页脚样式 */
footer {
    background: #2c3e50;
    color: white;
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    line-height: 1.8;
}

.footer-links a:hover {
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }
    
    .nav-links {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

.report-container {
    margin: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-content {
    margin-top: 15px;
}

.report-content p {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.report-container h2 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* 用户选择器样式优化 */
.user-selector {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.user-selector label {
    margin-right: 1rem;
    font-size: 1.1rem;
    color: #4a4a4a;
}

.user-selector select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 200px;
    background: white;
    transition: all 0.3s ease;
}

.user-selector select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.2);
}

/* 健康建议样式 */
.advice-content {
    flex: 1;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 1rem;
}

.advice-content p {
    margin: 0.5rem 0;
    line-height: 1.5;
    color: #2c3e50;
}

.advice-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.advice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.advice-card h3 {
    margin-bottom: 1rem;
    color: #4a4a4a;
}

/* 社区活动样式 */
.community-events {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.event-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-type-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: white;
}

.event-type-tag.jiangzuo { background: #4CAF50; }
.event-type-tag.wenhua { background: #2196F3; }
.event-type-tag.tiyu { background: #FF9800; }
.event-type-tag.yule { background: #9C27B0; }
.event-type-tag.zhiyuan { background: #795548; }

.event-details {
    margin: 1rem 0;
    color: #666;
}

.event-details p {
    margin: 0.5rem 0;
}

.event-details i {
    margin-right: 0.5rem;
    color: #6e8efb;
}

.event-description {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.event-description p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.event-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.event-contact {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.event-contact p {
    margin: 0.5rem 0;
}

.event-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.event-actions .action-btn {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-actions .edit-btn {
    color: #2196F3;
}

.event-actions .delete-btn {
    color: #f44336;
}

.event-actions .action-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

/* 用户管理样式 */
.user-management-controls {
    margin-bottom: 2rem;
    text-align: right;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.add-btn {
    background: #4CAF50;
    color: white;
}

.edit-btn {
    background: #2196F3;
    color: white;
}

.add-btn:hover { background: #45a049; }
.edit-btn:hover { background: #1976D2; }
.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 编辑数据按钮样式 */
.edit-data-btn {
    background: none;
    border: none;
    color: #2196F3;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.edit-data-btn:hover {
    color: #1976D2;
}

/* 更新模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: white;
    margin: 20px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    overflow: hidden; /* 确保圆角边框完整显示 */
}

.modal-header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 1.5rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #eee;
}

.close-modal {
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-modal:hover {
    transform: rotate(90deg);
}

/* 数据显示样式 */
.data-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.data-section p {
    margin: 0.8rem 0;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.data-section strong {
    color: #2c3e50;
    margin-right: 1rem;
}

/* 按钮样式 */
.modal-footer button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.edit-btn {
    background: #2196F3;
    color: white;
}

.close-btn {
    background: #9e9e9e;
    color: white;
}

.submit-btn {
    background: #4CAF50;
    color: white;
}

.cancel-btn {
    background: #f44336;
    color: white;
}

.edit-btn:hover { background: #1976D2; }
.close-btn:hover { background: #757575; }
.submit-btn:hover { background: #45a049; }
.cancel-btn:hover { background: #d32f2f; }

/* 编辑表单样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6e8efb;
}

/* 滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #6e8efb;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a777e3;
}

/* 医疗记录样式 */
.medical-record {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #6e8efb;
}

/* 趋势分析样式 */
.trend-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.trend-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

/* 图标样式统一 */
.action-btn i,
.submit-btn i,
.edit-btn i,
.delete-btn i,
.close-btn i {
    font-size: 1.1rem;
}

.form-buttons {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* 美化功能按钮 */
.function-btn {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    margin: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.function-btn:hover {
    background: linear-gradient(145deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.function-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.function-btn i {
    margin-right: 8px;
    font-size: 18px;
}

/* 不同类型按钮的颜色 */
.consultation-btn {
    background: linear-gradient(145deg, #2196F3, #1976D2);
}

.consultation-btn:hover {
    background: linear-gradient(145deg, #1976D2, #2196F3);
}

.appointment-btn {
    background: linear-gradient(145deg, #FF5722, #F4511E);
}

.appointment-btn:hover {
    background: linear-gradient(145deg, #F4511E, #FF5722);
}

/* 禁用状态 */
.function-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* 修改远程医疗服务容器样式 */
.telemedicine-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* 修改功能按钮容器样式 */
.function-buttons {
    display: flex;
    justify-content: center;
    gap: 3rem; /* 增加按钮之间的间距 */
    width: 100%;
    max-width: 800px; /* 限制最大宽度 */
}

/* 调整功能按钮样式 */
.function-btn {
    min-width: 200px; /* 增加按钮的最小宽度 */
    padding: 15px 30px; /* 增加按钮内边距 */
    font-size: 1.1rem; /* 稍微增大字体 */
}

/* 确保图标和文字对齐 */
.function-btn i {
    margin-right: 10px;
    font-size: 1.2rem;
} 